﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MVCLD.Models.Article>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Latest Submitted
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Latest Submitted Unconfirmed Articles</h2>
    
    <table class="admintable">
        <tr>

            <th>
                Article Title
            </th>
            <th>
                Submitter Name
            </th>

            <th>
                Submitter IP
            </th>
            <th>
                Email
            </th>
                        <th></th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink(item.ArticleTitle, "Edit", new { id=item.ArticleID }) %> 
            </td>
            <td>
                <%= Html.Encode(item.SubmitterName) %>
            </td>
            <td>
                <%= Html.Encode(item.SubmitterIP) %>
            </td>
            <td>
                <%= Html.Encode(item.Email) %>
            </td>
            <td>
                <%= Html.ActionLink("Delete", "Delete", new { id=item.ArticleID })%>
            </td>
        </tr>
    
    <% } %>

    </table>


</asp:Content>

